package com.supplychainapi.dao.prod;

import com.supplychainapi.domain.RoleEntity;
import com.supplychainapi.model.Tbrole;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.HashMap;
import java.util.List;

public interface TbroleMapper extends Mapper<Tbrole> {
    List<RoleEntity> getList(@Param("fsShopGUID") String fsShopGUID, @Param("fsRoleName") String fsRoleName);

    List<HashMap<String, String>> findProgList();

    List<HashMap<String, String>> findProgDtlList();

    List<HashMap<String, String>> findUserAuthList(@Param("fsShopGUID") String fsShopGUID, @Param("fsRoleId") String fsRoleId);

    Tbrole findNormalRole(@Param("fsShopGUID") String fsShopGUID, @Param("fsRoleId") String fsRoleId);

    Tbrole findNoDeleteByRoleName(@Param("fsShopGUID") String fsShopGUID, @Param("fsRoleName") String fsRoleName);

    Tbrole findDeleteByRoleName(@Param("fsShopGUID") String fsShopGUID, @Param("fsRoleName") String fsRoleName);

    Tbrole findNoDeleteByRoleId(@Param("fsShopGUID") String fsShopGUID, @Param("fsRoleId") String fsRoleName);

    Integer findUserRoleCountByRoleId(@Param("fsShopGUID") String fsShopGUID, @Param("fsRoleId") String fsRoleName);

    boolean deleteByRoleId(@Param("fsShopGUID") String fsShopGUID, @Param("fsRoleId") String fsRoleName);

    boolean add(Tbrole tbrole);

    Integer findDeleteCount(@Param("fsShopGUID") String fsShopGUID, @Param("fsRoleId") String fsRoleId);

    List<HashMap<String, String>> findDownRoleList(@Param("fsShopGUID") String fsShopGUID, @Param("fsRoleId") String fsRoleId);

    void updateRole(Tbrole tbrole);
}